1. Field of the Invention
This invention relates generally to the computer control printing, displaying, or other presentation of documents which may have text, graphical components, and/or images. This invention is more particularly related to a method and system for processing the beginning and ending of pictures or pagesets in a document data stream, keeping track of the status of the presentation device referred to as the state of the virtual machine using a set of dictionaries, defined later, a context stack defining the search order of the dictionaries, a state variable table, a set of resources, and an operand stack.
2. Discussion of the Background
The development of laser printers in the early 1970s provided an opportunity for high quality, low cost printing of documents, which contained not only character text but also general graphical material. The primary method of controlling commands by the computer to the printer employed the so called "escape sequence" commands, similar to the type of commands used in the DIABLO.RTM. command sequence. These types of commands were distinguished from typical character data by preceding each command with a special byte, generally an escape character (ASCII 27). This methodology works acceptably with daisy wheel or dot matrix printers but is not well suited for printing documents that might have changing requirements. For example, as needs change and as technology improves, an upgrade of the presentation device is necessary. This type of upgrade in the past would have required removal of the program controller of conventional presentation devices. At a minimum, a new PROM containing instructions for the printer would be required. This is not a commercially acceptable way of handling temporary changes, as a new PROM would be installed for a few print jobs, and would then have to be replaced with the original PROM or another new PROM. This method of upgrade is wasteful and results in many failures of the presentation device controller.
As a response to the limitations inherent in the escape sequence commands, different types of "page description language" (PDL) were developed generally to control laser printers or other types of page printers. Backward compatibility of these laser printers was provided by way of an ability to accept escape sequence commands. Two current examples of page description language are the PostScript.RTM. system from Adobe Systems Incorporated and InterPress.RTM. from Xerox.RTM. Corporation. Several other proprietary PDLs are also known.
Some of the prior art page description languages provided various improvements to the standard escape sequences known previously, such as by providing tools and syntax for manipulation of objects, or by providing for the use of operand stacks or the like. Moreover, they are stack-oriented programming languages. These languages also allowed, in some cases, for dynamic changes in the printer's state, such as the ability to add fonts or graphical images to the resources that might be available to the printer. Some of these features are documented in such generally available reference works as Adobe System Incorporated's "PostScript Language Reference Manual" and the "PostScript Language Program Design," both by Addison-Wesley Publishing Company (1985 and 1988, respectively). Other PDLs are also described in various technical and reference books such as "InterPress, The Source Book" by Harrington et al. (Simon and Schuster, Inc.,1988)
A standardized page description language has been proposed and is being developed as an international standard by the International Organization for Standardization ("ISO"). The proposal, to which one of the present inventors is a contributor, is currently in draft form before a section of the ISO. The draft is known as ISO/IEC DIS 10180, labeled "Information Processing Text-Communication Standard Page Description Language" and is available through the American National Standards Institute("ANSI") in New York.
Many of the prior art types of page description languages suffer from various flaws. For example, one shortcoming of the PostScript.RTM. language is that a page description for a particular document can contain a new definition such as a resource definition (i.e. an additional font) or a new dictionary definition that can be used anywhere in the document. In other words, no structure is enforced in PostScript.RTM. and therefore, the entire content of the document must be processed to determine whether a particular printer has the resources necessary to print it. If this "preprocessing" is not performed, it is possible that the printing of a document may fail at any point during the printing process, even at the very end, due to the inability of the printer to comply with commands of the document page description.
Additional problems are associated with the prior art systems that employ PostScript.RTM.. For example, to print a given page of a document, it is generally necessary to read and process, before presenting a page, the entire PDL description of all the preceding pages of the document, in order to decide the state of the document page setup parameters (i.e., resource declarations, dictionary definitions or the like). In other words, a print controller program must read the entire PDL description of a document to consider the effect of every page setup command between the beginning of the document and the specified page. While this page setup scanning process is relatively straightforward, it does require a significant amount of processor time, which can be better used by the printer.
Additionally, there are no syntax or semantics defined in the PostScript.RTM. language to handle a structure, a prologue or a scope of a data declaration. There is a convention. This convention, however, does not need to be followed.
One problem with the well known InterPress.RTM. system from Xerox.RTM. is that its structure does not effectively handle dictionary definitions contained in an inputted data stream. Nor does InterPress.RTM. use the prologue structure in an expeditious manner. Also, the standard InterPress.RTM. encoding is only binary rather than clear text which a human can read.